package com.jeff.cloud.consumermovie.feign;

import feign.Feign;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * 只要hystrix在项目的classpath中，Feign就会用断路器包裹Feign客户端所有方法。
 * 很多场景并不需要，如果禁用：1、可为不需要的FiegnClient配置configuration=本类.class,2、全局配置feign.hystrix.enable=false即可
 * @author: jeff
 * @date: 2021/8/10 17:40
 */
@Configuration
public class FeignDisableHystrixConfiguration {
    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilder(){
        return Feign.builder();
    }

}
